/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package UT14_CargarPlanSolucion;

import Herramientas.Herramientas;
import Herramientas.RadioButtonEditor;
import Herramientas.RadioButtonRenderer;
import Herramientas.Visualizacion;
import javax.swing.JCheckBox;
import javax.swing.JRadioButton;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Nahuel
 */
public class UT14_1_2_VerInformeDesercion extends javax.swing.JFrame {

    /**
     * Creates new form UT05_3_VerInformeDesercion @TODO Piane: Hacer la
     * pantalla como el informe de deserción de Google Drive
     */
    public UT14_1_2_VerInformeDesercion() {
//        Visualizacion.setVisual(this);
        initComponents();
        jMenu1.setText(Herramientas.getNombreParaPantalla(this) + jMenu1.getText());
        //        DefaultTableModel model = new DefaultTableModel() {
        //
        //            Class[] types = new Class[]{
        //                java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Boolean.class
        //            };
        //
        //            @Override
        //            public Class getColumnClass(int columnIndex) {
        //                return types[columnIndex];
        //            }
        //        };
        //        model.addColumn("Solución");
        //        model.addColumn("Causa de Deserción");
        //            model.addColumn("Tipo de Planificacion");
        //        model.addColumn("Efectividad");
        //        model.addColumn("Aplicar");
        //        model.addRow(new Object[]{"Asignar Tutor", "Acumulación de Regularidades, Acumulación de Aplazos","", "60%", false});
        //        model.addRow(new Object[]{"Curso de Apoyo", "Acumulación de Regularidades, Acumulación de Aplazos","", "70%", false});
        //        model.addRow(new Object[]{"Beca de Estudio", "Falta de interés/motivación, Acumulación de inasistencias","", "50%", false});
        //        model.addRow(new Object[]{"Beca de Trabajo", "Falta de interés/motivación", "","70%", false});
        ////        jTable1.setModel(model);
        ///////////////////////////////////////////
        ///////////////////////////////////////////
        ///////////////////////////////////////////
        DefaultTableModel modelo = new DefaultTableModel();
        Object[] columnas = new Object[]{"Causa de Deserción", "Tipo Solución", "Tipo Planific.", "Eficacia", "Recursos", "Seleccionar"};
        Object[][] obj1 = new Object[4][columnas.length];


        obj1[0][0] = "Promedio General entre 4 y 6,5";
        obj1[0][1] = "Asignar Tutor";
        obj1[0][2] = "2 - 4 meses";
        obj1[0][3] = "80%";
        obj1[0][4] = "Si";
        obj1[0][5] = new JRadioButton();
        JRadioButton jr = (JRadioButton) obj1[0][5];
        jr.setSelected(true);


        obj1[1][0] = "Promedio General entre 4 y 6,5";
        obj1[1][1] = "Curso de Apoyo";
        obj1[1][2] = "6 - 8 meses";
        obj1[1][3] = "60%";
        obj1[1][4] = "Si";
        obj1[1][5] = new JRadioButton();

        obj1[2][0] = "Costea Estudios con su trabajo";
        obj1[2][1] = "Beca de Trabajo";
        obj1[2][2] = "8 - 10 meses";
        obj1[2][3] = "75%";
        obj1[2][4] = "Si (2 de 5)";
        obj1[2][5] = new JRadioButton();

        obj1[3][0] = "Título Secundario Bachiller";
        obj1[3][1] = "Asignar Tutor";
        obj1[3][2] = "8 - 10 meses";
        obj1[3][3] = "70%";
        obj1[3][4] = "Si";
        obj1[3][5] = new JRadioButton();


        modelo.setDataVector(obj1, columnas);
        jTableProyectoSol.setModel(modelo);

        jTableProyectoSol.getColumn("Seleccionar").setCellRenderer(new RadioButtonRenderer());
        jTableProyectoSol.getColumn("Seleccionar").setCellEditor(new RadioButtonEditor(new JCheckBox()));

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTableProyectoSol = new javax.swing.JTable();
        jLabel7 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jTextArea1.setText("\n\n\n\n\n\n   INFORME DE DESERCIÓN");
        jScrollPane1.setViewportView(jTextArea1);

        jButton1.setText("Aplicar Proyecto Solución");

        jButton2.setText("Agregar Nuevo Proyecto Solución");

        jLabel2.setText("Alumno: Matias Borges");

        jTableProyectoSol.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "pj", "Objetivo"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane3.setViewportView(jTableProyectoSol);

        jLabel7.setText("Proyecto Solución Sugerido");

        jMenu1.setText("Informe de Deserción");
        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 597, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel7))
                                .addGap(0, 0, Short.MAX_VALUE)))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jButton2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton1)
                        .addGap(39, 39, 39))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 47, Short.MAX_VALUE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton1)
                            .addComponent(jButton2)))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(UT14_1_2_VerInformeDesercion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(UT14_1_2_VerInformeDesercion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(UT14_1_2_VerInformeDesercion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(UT14_1_2_VerInformeDesercion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new UT14_1_2_VerInformeDesercion().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTable jTableProyectoSol;
    private javax.swing.JTextArea jTextArea1;
    // End of variables declaration//GEN-END:variables
}
